package cc.tutorial.aop.controller;

import cc.tutorial.aop.annotation.OperateLogAnnotation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by rico on 2018/5/7.
 */
@Controller
@RequestMapping(value = "/hello")
public class HelloController {
    private static final Logger logger = LoggerFactory.getLogger(HelloController.class);

    @RequestMapping(value = "/sayHello")
    @ResponseBody
    @OperateLogAnnotation(value = "sayHello", description = "say hello...")
    public String sayHello(String name) throws Exception {
        return "hello ".concat(name).concat(" !");
    }


}
